package com.tarim.streetdance.mapper;

import com.tarim.streetdance.model.VideoLike;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component("VideoLikeMapper")
public interface VideoLikeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(VideoLike record);

    //新增点赞记录
    int insertSelective(VideoLike record);

    VideoLike selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(VideoLike record);

    int updateByPrimaryKey(VideoLike record);

    //删除点赞记录
    int updateForDelete(VideoLike record);

    //查询用户点赞记录
    List<VideoLike> selectByUserId(VideoLike record);
    Long selectByUserIdCount(VideoLike record);

    //查询视频点赞数量
    Long selectCountByVideoId(VideoLike record);

    //查询用户是否点赞对应视频
    Long selectCountForIsLike(VideoLike record);
}